package com.example.check.mapper;

import com.example.check.entity.RoleEntity;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;

/**
 * Created by Tony Yao on 2017/7/15.
 */
public interface RoleMapper {

    ArrayList<RoleEntity> selectAllRole()throws Exception;

    ArrayList<RoleEntity> selectRoleById(@Param("id")int id)throws Exception;

    ArrayList<RoleEntity> selectRoleByField(@Param("field") String field, @Param("code")String code) throws Exception;

    ArrayList<RoleEntity> selectRoleLikeByField(@Param("field") String field, @Param("code")String code) throws Exception;

    void deleteRoleById(int id)throws Exception;

    void insertRole(RoleEntity role)throws Exception;

    void editRole(RoleEntity role)throws Exception;
}
